#include <iostream>
#include <chrono>
#include <thread>
#include "TrDataGenerator.h"
#include "TrManager.h"
#include "CMReceiver.h"
#include "TrHelper.hpp"
#include "TrCurlUtils.h"


int main()
{
	//CTrDataGenerator dg("SA405", Tr_DataStyle::M15, 100);
	CTrManager* pManager = new CTrManager();

	//pManager->TrUserLogin("9070", "335302", "zmin821001", "tcp://124.74.237.192:41305", "client_dytrader_1.0.0", "JH9RXJ5Z6NK3DC33");
	//pManager->TrSetFront("tcp://124.74.237.192:41313");

	pManager->TrUserLogin("9999", "112537", "zmin821001", "tcp://180.168.146.187:10130", "simnow_client_test", "0000000000000000");
	pManager->TrSetFront("tcp://180.168.146.187:10131");
	//
	//pManager->TrAddSubscribe("ss2405");
	pManager->TrAddSubscribe("SA405");
	pManager->TrAddReceiver(new CMReceiver());
	pManager->TrStart();

	pManager->TrAddSubscribe("ss2405");

	pManager->TrQuote("ss2405", 5);



	while (true)
	{
		std::this_thread::sleep_for(std::chrono::microseconds(100));
	}
	return 0;
}